<template>
  <div id="app">
    <router-view/>
  </div>
</template>
<script>
export default {
  mounted(){
    function isLogin (){
      if ( localStorage.removeItem("user")) {
        this.$router.push('/login')
      }
    };
    window.onload = function () {
      if (!window.sessionStorage["ISlogin"]) {
        // 关闭浏览器
        localStorage.removeItem("user")
        localStorage.removeItem("menus")
      } else {
        // 刷新
      }
    };
    window.onunload = function () {
      window.sessionStorage["ISlogin"] = true;
    };
    window.onbeforeunload = function (e) {
      window.sessionStorage["ISlogin"] = true;
    }
  }
}
</script>
<style>
  #app{

  }
</style>
